package com.wanmait.hr.controller;

import com.wanmait.hr.service.LateInfoService;
import com.wanmait.hr.vo.LateInfo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import java.util.List;
/**
 * Demo class
 *
 * @author 陈宁
 * @date 2019/2/12
 */
@Controller
public class LateInfoController {
    @Resource
    private LateInfoService lateInfoService;
    /**迟到记录*/
    @RequestMapping("/manage/late_info/list")
    public void list(){}

    @RequestMapping("/manage/late_info/list_data")
    public ModelAndView list_data(){
        ModelAndView mv = new ModelAndView();
        List<LateInfo> late=lateInfoService.findAll();
        return mv.addObject("late",late);
    }

    /**修改备注*/
    @RequestMapping(value = "/manage/late_info/update_remarks",method = RequestMethod.GET)
    public void updateRemarks(LateInfo lateInfo){lateInfoService.updateRemarks(lateInfo);}

    /**修改是否特殊*/
    @RequestMapping(value = "/manage/late_info/isSpecial",method = RequestMethod.GET)
    public void isSpecial(LateInfo lateInfo){lateInfoService.isSpecial(lateInfo);}
}
